This ensures that the drawing does not extend the actually drawn area.
It also ensures that our math is sane, because the math assumes the clip
area cannot extend the window. After all, before GTK4 it always was like
that.
Fixes a bunch of drawing bugs when the clip area does indeed extend too
far.
bin_window_width = gdk_window_get_width (tree_view->priv->bin_window);
bin_window_height = gdk_window_get_height (tree_view->priv->bin_window);
+ cairo_rectangle (cr, 0, 0, bin_window_width, bin_window_height);
+ cairo_clip (cr);
+
if (!gdk_cairo_get_clip_rectangle (cr, &clip))
return TRUE;
new_y = TREE_WINDOW_Y_TO_RBTREE_Y (tree_view, clip.y);
-
- if (new_y < 0)
- new_y = 0;
y_offset = -_gtk_rbtree_find_offset (tree_view->priv->tree, new_y, &tree, &node);
if (gtk_tree_view_get_height (tree_view) < bin_window_height)